<template>
	<view>
		<!-- tab切换 -->
		<view class="tabselect">
			<view :class="tabindex==0?'active':''" @click="selectindex(0)">未使用</view>
			<view :class="tabindex==1?'active':''" @click="selectindex(1)">已使用</view>
			<view :class="tabindex==2?'active':''" @click="selectindex(2)">
				已过期
			</view>
		</view>
			
		<!-- 层级盒子 -->
		<view class="" style="width: 100%;height: 100rpx;"> 
			
		</view>
			
		<view class="">
			<scroll-view scroll-y="true">
				<view class="list" v-for="(item,index) in 5" :key="index">
					<view class="left">
						<view class="" style="font-size: 60rpx;">
							<text style="font-size: 32rpx;">￥</text>
							50
						</view>


						<view class="daijin">
							代金券
						</view>
					</view>
					<view class="right">
						去使用
					</view>
				</view>
			</scroll-view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tabindex: 0,
			}
		},
		methods: {
			//tab切换
			selectindex(index) {
				this.tabindex = index
			},
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #f2f2f2;
	}

	.tabselect {
		width: 100%;
		background-color: #FFFFFF;
		padding: 20rpx 0;
		font-size: 28rpx;
		color: #a6a097;
		display: flex;
		align-items: center;
		justify-content: space-around;
		position: fixed;
		top: 0;
		left: 0;
		z-index: 999;
	}

	.tabselect .active {
		color: #f49c1c;
	}
	.list{
		width: 686rpx;
			height: 212rpx;
			background-color: #ffffff;
			border-radius: 12rpx;
			margin: 20rpx auto;
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 0 30rpx;
			.left{
				color: #ea8f0b;
				display: flex;
				align-items: center;
				.daijin{
					font-size: 36rpx;
					margin-left: 30rpx;
				}
			}
			.right{
				width: 124rpx;
					height: 52rpx;
					background-color: #f49c1c;
					border-radius: 27rpx;
					color: #FFFFFF;
					display: flex;
					align-items: center;
					justify-content: center;
			}
	}
</style>
